// the handoff between yield() and
// closeWindow().
System.err.printf("secondary exiting at wrong time, why?\n");
synchronized (application.primaryEventHandler) {
application.primaryEventHandler.notify();
}
synchronized (this) {
if (debugThreads) {
System.err.printf("%s %s sleep\n", this,
primary ? "primary" : "secondary");
}
this.wait();